package com.anti.modular.bus.housebilldetail.service;

import com.anti.jdbc.support.page.PageParam;
import com.anti.jdbc.support.page.PageResult;
import com.anti.modular.bus.housebilldetail.entity.HouseBillDetail;
import com.anti.modular.bus.housebilldetail.param.HouseBillDetailParam;
import com.anti.modular.bus.housebilldetail.result.BillDetailForEditResult;
import com.anti.modular.bus.housebilldetail.result.HouseBillDetailResult;
import org.springframework.web.bind.annotation.PathVariable;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 账单详情service接口
 *
 * @author anti
 * @date 2021-05-07 09:59:49
 */
public interface HouseBillDetailService{

    /**
    * 根据主键查询实体
    */
    HouseBillDetail getById(HouseBillDetailParam houseBillDetailParam);

    /**
     * 查询账单详情
     *
     * @author anti
     * @date 2021-05-07 09:59:49
     */
    PageResult page(PageParam pageParam,HouseBillDetailParam houseBillDetailParam);

    /**
     * 账单详情列表
     *
     * @author anti
     * @date 2021-05-07 09:59:49
     */
    List<HouseBillDetail> list(HouseBillDetailParam houseBillDetailParam);

    List<HouseBillDetailResult> getListById(Long houseBillId);

    List<HouseBillDetail> getListByIdAndType(Long houseBillId,int type);

    List<HouseBillDetail> getNoCbListById(Long houseBillId);

    BigDecimal getXIaojiById(Long houseBillId);

    List<HouseBillDetailResult> getListByIdWithNoXz(Long houseBillId);
    /**
     * 添加账单详情
     *
     * @author anti
     * @date 2021-05-07 09:59:49
     */
    void add(HouseBillDetailParam houseBillDetailParam);

    Long add(HouseBillDetail houseBillDetail);

    /**
     * 為賬單添加預訂信息詳情
     * @param billPk 賬單主鍵
     * @param reservationId 預訂主鍵
     * @param deposit 預訂押金
     * @param date
     * @param sysLoginUserId
     * @return
     */
    void addYdDetail( Long billPk,Long reservationId,BigDecimal deposit, Date date, Long sysLoginUserId);

    /**
     * 删除账单详情
     *
     * @author anti
     * @date 2021-05-07 09:59:49
     */
    void delete(HouseBillDetailParam houseBillDetailParam);

    void deleteByBillIdAndType(Long billId,int type);

    /**
     * 编辑账单详情
     *
     * @author anti
     * @date 2021-05-07 09:59:49
     */
    void edit(HouseBillDetailParam houseBillDetailParam);

    void editBillDetailByLeaseIdAndQsNum(Long leaseId,int qsNum,BigDecimal decimal);

    void editJe(HouseBillDetailParam houseBillDetailParam);

    /**
     * 查看账单详情
     *
     * @author anti
     * @date 2021-05-07 09:59:49
     */
     HouseBillDetail detail(HouseBillDetailParam houseBillDetailParam);

    BillDetailForEditResult detailByBillId(Long billId,int type);

}
